/*
 * @Author: ducafecat
 * @Description: 列表页
 * @Date: 2018-04-13 16:13:27
 * @Last Modified by: hans.taozhiwei
 * @Last Modified time: 2018-04-13 16:15:33
 */
import { list, remove, choiceAdd } from '@/api/hmmm/questions'
import { list as sublist } from '@/api/hmmm/subjects'
import { list as catelist } from '@/api/hmmm/directorys'
import { list as tagslist } from '@/api/hmmm/tags'
import { reject } from 'core-js/fn/promise'

const app = {
  state: {
    name: ''
  },
  mutations: {
    SET_NAME: (state, name) => {
      state.name = name
    }
  },
  actions: {
    setName({ commit }, userInfo) {
      const username = userInfo.username.trim()
      return new Promise((resolve, reject) => {
        commit('SET_NAME', username)
        resolve()
      })
    }
  }
}

export default app
